package gamagora.game.animations
{
	import gamagora.game.map.OSLayer;
	import gamagora.game.map.OSWorldMap;
	
	import org.flixel.FlxSprite;
	
	public class OSAnimation extends FlxSprite
	{
		public static const NO_BACKGROUND:uint = 0;
		public static const BACKGROUND1:uint = 1;
		public static const BACKGROUND2:uint = 2;
		public static const BACKGROUND3:uint = 3;
		
		protected var _background:uint;
		private var _drawX:Number;
		private var _lastX:Number;
		private var _layer:OSLayer;
		
		public function OSAnimation(X:Number=0, Y:Number=0, background:uint = NO_BACKGROUND, SimpleGraphic:Class = null)
		{
			super(X, Y, SimpleGraphic);
			_background = background;
			/*_drawX = 0;
			
			switch(_background)
			{
				case BACKGROUND1:
					_layer = OSWorldMap.background1;
					break;
				case BACKGROUND2:
					_layer = OSWorldMap.background2;
					break;
				case BACKGROUND3:
					_layer = OSWorldMap.background3;
					break;
			}*/
		}
		
		public override function update():void
		{
			super.update();
			/*if(_background != NO_BACKGROUND && !_layer.onStart && !_layer.onEnd)
			{
				_drawX = x - _layer.scrollPos;
			}*/
		}
		
		public override function draw():void
		{/*
			if(_background != NO_BACKGROUND)
			{
				_lastX = x;
				x = _drawX;
				super.draw();
				x = _lastX;
			}
			else 
			{*/
				super.draw();
			//}
		}
	}
}